// 校验方法大全

/** 校验邮箱 */
export const checkEmail = (email: string) => /^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/.test(email)

/** 校验手机号 */
export const checkPhone = (phone: string | number) => {
    phone = String(phone);
    return /^1(3|4|5|6|7|8|9)[0-9]{9}$/.test(phone)
}

/** 校验姓名 */
export const checkUserName = (name: string) => /^[\u4E00-\u9FA5]{2,4}$/.test(name)